package com.myapp.db;

import java.util.List;

import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.Query;

@Stateless
public class ProcessEngineDataGetter {
    @PersistenceContext(unitName="camundaProcessEngine")
    private EntityManager entityManager;
    
    @SuppressWarnings("unchecked")
	public List<Object[]> getSomething() {
    	Query query = entityManager.createNativeQuery("SELECT id_, name_ FROM act_re_procdef");
    	List<Object[]> resultList = query.getResultList();
    	return resultList;
    }
}
